<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateManagement extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('management', function (Blueprint $table) {

            $table->bigIncrements('id');
            $table->string('name', 50)->nullable()->comment('姓名');
            $table->string('username', 50)->comment('登录名');
            $table->string('password')->comment('登录密码');
            $table->string('phone', 20)->nullable()->comment('电话');
            $table->string('avatar', 100)->nullable()->comment('头像');
            $table->tinyInteger('status', false, true)->default(1)->comment('状态 1-正常 0-禁用');

            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('management');
    }
}
